#include <stdio.h>
#include <unistd.h>
#include <time.h>

int
main(int argc, char* argv[])
{
	int i_pid=fork();
	printf("i = %d\n",i_pid);
	if (i_pid > 0)
	{
		printf("parent thread exit!\n");
		return 0;
	}

	setsid();
	chdir("/home/liu");
	umask(0);

	sleep(1);

	int i = 0;

	while(i<5)
	{
		printf("\nI am here!\n");
		sleep(3);
		i++;
	}
	return 0;
}
